package com.xiaolong.web.handler;


import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class BaseController {
    protected Logger log = LoggerFactory.getLogger(this.getClass());

    protected final static String Page = "page";
    protected final static String PageSize = "pageSize";

    @Autowired
    protected HttpServletRequest request;
    @Autowired
    protected HttpSession session;
    @Autowired
    protected HttpServletResponse response;


    public long getPage() {
        return Long.parseLong(request.getParameter(Page));
    }

    public long getPageSize() {
        return Long.parseLong(request.getParameter(PageSize));
    }
}
